package fr.epsi.spring1.service.impl;

import java.util.ArrayList;
import java.util.List;

import fr.epsi.spring1.domain.Article;
import fr.epsi.spring1.domain.Stock;
import fr.epsi.spring1.service.StockManager;

public class DummyStockManagerImpl implements StockManager {

	@Override
	public boolean ajouter(Article article, Double quantite) {
		return true;
	}

	@Override
	public List<Stock> getStock() {
		List<Stock> listOfStocks = new ArrayList<Stock>();
		Stock stock = new Stock();
		stock.setArticle(new Article());
		stock.getArticle().setReference("REF1");
		stock.setQuantite(2.);
		listOfStocks.add(stock);
		
		stock = new Stock();
		stock.setArticle(new Article());
		stock.getArticle().setReference("REF2");
		stock.setQuantite(3.);
		listOfStocks.add(stock);
		
		return listOfStocks;
	}

	@Override
	public Double getNbArticles() {
		return 5.;
	}

}
